/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.bar.carta.model.impl;

import com.bar.carta.model.TipoIdioma;

import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.model.CacheModel;

import java.io.Serializable;

/**
 * The cache model class for representing TipoIdioma in entity cache.
 *
 * @author pgonzalm
 * @see TipoIdioma
 * @generated
 */
public class TipoIdiomaCacheModel implements CacheModel<TipoIdioma>,
	Serializable {
	@Override
	public String toString() {
		StringBundler sb = new StringBundler(11);

		sb.append("{tipoIdiomaId=");
		sb.append(tipoIdiomaId);
		sb.append(", tipoId=");
		sb.append(tipoId);
		sb.append(", name=");
		sb.append(name);
		sb.append(", descripcion=");
		sb.append(descripcion);
		sb.append(", idioma=");
		sb.append(idioma);
		sb.append("}");

		return sb.toString();
	}

	public TipoIdioma toEntityModel() {
		TipoIdiomaImpl tipoIdiomaImpl = new TipoIdiomaImpl();

		tipoIdiomaImpl.setTipoIdiomaId(tipoIdiomaId);
		tipoIdiomaImpl.setTipoId(tipoId);

		if (name == null) {
			tipoIdiomaImpl.setName(StringPool.BLANK);
		}
		else {
			tipoIdiomaImpl.setName(name);
		}

		if (descripcion == null) {
			tipoIdiomaImpl.setDescripcion(StringPool.BLANK);
		}
		else {
			tipoIdiomaImpl.setDescripcion(descripcion);
		}

		tipoIdiomaImpl.setIdioma(idioma);

		tipoIdiomaImpl.resetOriginalValues();

		return tipoIdiomaImpl;
	}

	public long tipoIdiomaId;
	public long tipoId;
	public String name;
	public String descripcion;
	public int idioma;
}